﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SaleManagement.Model;

namespace SaleManagement.Services.Mapping
{
   public class ProductDisplayMapping
    {
 public static ViewModelProductDisplay ConvertToDisplay(ViewModelProduct model, ViewModelProductDetail modelDetail)
       {
           ViewModelProductDisplay modelDisplay = new ViewModelProductDisplay();
           modelDisplay.Id = model.Id;
           modelDisplay.Name = modelDetail.Name;
           modelDisplay.Detail = modelDetail.Detail;
           modelDetail.Summary = modelDetail.Summary;
           modelDisplay.Status = model.Status;
           modelDisplay.Category = model.CategoryId.ToString();
           modelDisplay.Image = model.Image;
           modelDisplay.UnitPrice = modelDetail.UnitPrice;
     
           return modelDisplay;
       }
    }
}
